<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #d1 {
        width: 100px;
        height: 100px;
        margin: 25px 0 0 25px;
        background-color: red;
        overflow: hidden;
      }

      #d1 > div {
        width: 50px;
        height: 50px;
        background-color: blue;
        margin: 25px 0 0 25px;
      }

      #d2 {
        width: 100px;
        height: 100px;
        box-sizing: border-box;
        margin: 0 0 0 125px;
        border: 5px solid green;
        border-radius: 5px;
        padding: 50px 0 0 50px;
      }
    </style>
  </head>

  <body>
    <div id="d1">
      <div></div>
    </div>
    <div id="d2">哈喽</div>
  </body>
</html>
